<!--
 * @Descripttion: 
 * @version: 
 * @@Company: DCIT-SH
 * @Author: 王富银
 * @Date: 2024-08-16 22:10:16
 * @LastEditors: Sunny Chen
 * @LastEditTime: 2024-08-21 17:58:58
-->
<template>
  <Header v-if="!isEnterDataCenterView"></Header>
  <HeaderDataCenter
    v-if="isEnterDataCenterView"
    @closeDataCenter="closeDataCenter"
  ></HeaderDataCenter>
  <KeepAlive>
    <OpenMap></OpenMap>
  </KeepAlive>
</template>
<script>
export default {
  name: "HomeMapView",
};
</script>
<script setup>
import Header from "@/components/Header.vue";
import HeaderDataCenter from "@/components/HeaderDataCenter.vue";
import OpenMap from "@/views/OpenMap.vue";
import { storeToRefs } from "pinia";
import { usePostStore } from "@/stores";
const postStore = usePostStore();
const { updateEnterDataCenterView } = postStore;
const { isEnterDataCenterView } = storeToRefs(postStore);

const closeDataCenter = () => {
  updateEnterDataCenterView(false);
};
</script>
